﻿namespace zUnitTesting.TestScripts
{
    using CommonServiceLocator.SpringAdapter;
    using Microsoft.Practices.ServiceLocation;
    using NUnit.Framework;
    using Spring.Context.Support;

    [SetUpFixture]
    public class TestConfig
    {
        [SetUp]
        public void SetUp()
        {
            CodeConfigApplicationContext appContext = new CodeConfigApplicationContext();
            appContext.ScanAllAssemblies();
            appContext.Refresh();
            ServiceLocator.SetLocatorProvider(() => new SpringServiceLocatorAdapter(appContext.ObjectFactory)); 
        }
    }
}
